//
// Created by gyc on 2020/9/16.
//
#include "../../common.h"

class Solution {
public:
    int fib(int n) {
        if (n < 2) {
            return n;
        }
        int a = 0, b = 1;
        for(int i = 1; i < n; ++i) {
            int t = a + b;
            a = b;
            b = t;
        }
        return b;
    }
};

int main() {
    cout << Solution().fib(4) << endl;

}